 <div class="fly-panel fly-column"> 
   <div class="layui-container"> 
    <ul class="layui-clear"> 
     <li class="layui-hide-xs {:input('cid')?'':'layui-this'}"><a href="/">首页</a></li>
     {volist name="cates" id='cate'}
        <li class="layui-hide-xs {:input('cid')==$cate.cate_id?'layui-this':''}"><a href="{:url('index/index/index',['cid'=>$cate['cate_id']])}">{$cate.cate_name}</a></li>
     {/volist}
    </ul> 
    <div class="fly-column-right layui-hide-xs"> 
     <span class="fly-search LAY_search"><i class="layui-icon"></i></span> 
     <a href="{:url('index/jie/add')}" class="layui-btn">发表新帖</a> 
    </div> 
    <div class="layui-hide-sm layui-show-xs-block" style="margin-top: -10px; padding-bottom: 10px; text-align: center;"> 
     <a href="{:url('index/jie/add')}" class="layui-btn">发表新帖</a> 
    </div> 
   </div>
  </div>
  <div class="layui-container"> 
   <div class="layui-row layui-col-space15"> 
    <div class="layui-col-md8"> 

    {if condition="!input('cid')"}
     <div class="fly-panel layui-hide-xs"> 
      <div class="layui-row fly-panel-main" style="padding: 15px;"> 
       <div class="layui-carousel fly-topline" id="FLY_topline"> 
        <div carousel-item=""> 
         <div> 
          <a href="https://www.dcloud.io/?hmsr=flyui&amp;hmpl=&amp;hmcu=&amp;hmkw=&amp;hmci=" target="_blank" rel="nofollow"> <img src="//cdn.layui.com/upload/2018_12/168_1544542131867_66314.GIF" alt="HBuilder X" /> </a> 
         </div> 
         <div> 
          <a href="https://fly.layui.com/store/layuiQuietBlog/" target="_blank"> <img src="//cdn.layui.com/upload/2018_12/168_1544449546613_61526.jpg" alt="layui 静谧风格个人博客模板" /> </a> 
         </div> 
        </div> 
       </div> 
      </div>
     </div>
    

     <div class="fly-panel"> 
      <div class="fly-panel-title fly-filter"> 
       <a>置顶</a> 
       <a href="#signin" class="layui-hide-sm layui-show-xs-block fly-right" id="LAY_goSignin" style="color: #FF5722;">去签到</a> 
      </div> 
      <ul class="fly-list"> 
        {volist name="top" id="row"}
       <li> <a href="{:url('index/user/home',['uid'=>$row.user_id])}" class="fly-avatar"> <img src="__ROOT__/{$row.face}" alt="岁月小偷" /> </a> <h2> <a class="layui-badge">{$row.cate_name}</a> <a href="{:url('index/jie/index',['qid'=>$row.question_id])}">{$row.title}</a> </h2> 
        <div class="fly-list-info"> 
         <a href="/u/6497232" link=""> <cite>{$row.nickname}</cite> <i class="iconfont icon-renzheng" title="认证信息：2018年度 layui “社区之光”"></i> <i class="layui-badge fly-badge-vip">VIP3</i> </a> 
         <span>{:formatTime($row.create_time)}</span> 
         <span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻"><i class="iconfont icon-kiss"></i> {$row.kiss}</span> 
         <span class="fly-list-nums"> <i class="iconfont icon-pinglun1" title="回答"></i>{$row.reply_num}</span> 
        </div> 
        <div class="fly-list-badge"> 
            {if condition="$row.is_jing"}
                <span class="layui-badge layui-bg-red">精帖</span> 
            {/if}
        </div>
        </li>
        {/volist}
      </ul> 
     </div> 
    {/if}

     <div class="fly-panel" style="margin-bottom: 0;"> 
      <div class="fly-panel-title fly-filter">
       <a href="{:url('index/index/index',['type'=>0,'cid'=>input('cid')])}" class="{:input('type')==0?'layui-this':''}">综合</a>
       <span class="fly-mid"></span>
       <a href="{:url('index/index/index',['type'=>1,'cid'=>input('cid')])}" class="{:input('type')==1?'layui-this':''}">未结</a>
       <span class="fly-mid"></span>
       <a href="{:url('index/index/index',['type'=>2,'cid'=>input('cid')])}" class="{:input('type')==2?'layui-this':''}">已结</a>
       <span class="fly-mid"></span>
       <a href="{:url('index/index/index',['type'=>3,'cid'=>input('cid')])}" class="{:input('type')==3?'layui-this':''}">精华</a>
      </div> 
      <ul class="fly-list">
      {if condition="$all_data->total()"} 
       {volist name="all_data" id="row"}
           <li> <a href="{:url('index/user/home',['uid'=>$row.user_id])}" class="fly-avatar"> <img src="__ROOT__/{$row.face}" alt="岁月小偷" /> </a> <h2> <a class="layui-badge">{$row.cate_name}</a> <a href="{:url('index/jie/index',['qid'=>$row.question_id])}">{$row.title}</a> </h2> 
            <div class="fly-list-info"> 
             <a href="/u/6497232" link=""> <cite>{$row.nickname}</cite> <i class="iconfont icon-renzheng" title="认证信息：2018年度 layui “社区之光”"></i> <i class="layui-badge fly-badge-vip">VIP3</i> </a> 
             <span>{:formatTime($row.create_time)}</span> 
             <span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻"><i class="iconfont icon-kiss"></i> {$row.kiss}</span> 
             {if condition="$row.status"}
             <span class="layui-badge fly-badge-accept layui-hide-xs">已结</span>
             {/if}
             <span class="fly-list-nums"> <i class="iconfont icon-pinglun1" title="回答"></i>{$row.reply_num}</span> 
            </div> 
            <div class="fly-list-badge"> 
                {if condition="$row.is_jing"}
                    <span class="layui-badge layui-bg-red">精帖</span> 
                {/if}
            </div>
            </li>
        {/volist}
        {else/}
            <li class="fly-none">暂时没有提问</li>
        {/if}
      </ul> 
      <style>

            .pagination{
                padding: 20px 0px;
            }

          .pagination li{
                display: inline-block;
                padding: 3px 10px;
                border: 1px solid #009688;
                margin-right: 10px;
          }
          .pagination .active{
            background: #009688 url() 0 0 no-repeat;
            color: #fff;
          }
          .pagination .disabled{
            cursor: crosshair
          }
      </style>
      <div style="text-align: center"> 
        {$all_data->render()}
      </div> 
     </div> 
    </div> 
    <div class="layui-col-md4"> 
     <div class="fly-panel"> 
      <h3 class="fly-panel-title">温馨通道</h3> 
      <div class="layui-row fly-panel-main" style="padding: 15px;"> 
       <div class="layui-clear fly-list-quick"> 
        <div class="layui-col-xs6"> 
         <div> 
          <a href="/extend/" target="_blank"> 组件平台 </a> 
         </div> 
        </div> 
        <div class="layui-col-xs6"> 
         <div> 
          <a href="/case/2018/" target="_blank"> 年度案例 </a> 
         </div> 
        </div> 
        <div class="layui-col-xs6"> 
         <div> 
          <a href="http://fly.layui.com/jie/30227/" target="_blank"> 精贴集锦 </a> 
         </div> 
        </div> 
        <div class="layui-col-xs6"> 
         <div> 
          <a href="http://fly.layui.com/jie/4281/" target="_blank"> Git 仓库 </a> 
         </div> 
        </div> 
        <div class="layui-col-xs6"> 
         <div> 
          <a href="/store/" target="_blank"> layui 模板 </a> 
         </div> 
        </div> 
        <div class="layui-col-xs6"> 
         <div> 
          <a href="http://fly.layui.com/jie/13435/" target="_blank"> 关于飞吻 </a> 
         </div> 
        </div> 
        <a name="signin"> </a> 
       </div> 
      </div>
     </div> 
     <div class="fly-panel fly-signin"> 
      <div class="fly-panel-title">
        签到 
       <i class="fly-mid"></i> 
       <a href="javascript:;" class="fly-link" id="LAY_signinHelp">说明</a> 
       <i class="fly-mid"></i> 
       <a href="javascript:;" class="fly-link" id="LAY_signinTop">活跃榜<span class="layui-badge-dot"></span></a> 
       {if condition="$sign.is_login"}
         <span class="fly-signin-days">已连续签到<cite>{$sign.num}</cite>天</span>
       {/if}
      </div>

      {if condition="$sign.is_login"}
        <div class="fly-panel-main fly-signin-main">
          {if condition="$sign.is_sign"}
            <button class="layui-btn layui-btn-disabled">今日已签到</button>
          {else/}
            <button class="layui-btn layui-btn-danger" id="signin">今日签到</button>
              
          {/if}
          <span>可获得<cite>{$sign.kiss}</cite>飞吻</span>
        </div>
      {else/}
        <div class="fly-panel-main fly-signin-main"> 
         <button class="layui-btn layui-btn-danger" id="LAY_signin">今日签到</button> 
        </div>
      {/if}
     </div> 
     <div class="fly-panel"> 
      <div class="fly-panel-title">
        钻级赞助商 
       <span class="fly-mid"></span> 
       <a href="/jie/15697/" class="fly-link fly-joinad    ">我要加入</a> 
      </div> 
      <div class="fly-panel-main" style="padding: 13px 15px;"> 
       <a href="https://www.dcloud.io/?hmsr=flyui&amp;hmpl=&amp;hmcu=&amp;hmkw=&amp;hmci=" target="_blank" rel="nofollow" class="fly-zanzhu fly-zanzhu-img" time-limit="2018-01-15 0:0:0" style="background: none; border: 1px solid #f2f2f2"> <img src="//cdn.layui.com/upload/2018_12/168_1544603535347_9181.gif" alt="HBuilder X" /> </a> 
       <a href="https://m.aliyun.com/act/team1212/?params=N.p8ivHrliwe&amp;from=singlemessage" target="_blank" rel="nofollow" class="fly-zanzhu" style="background-color: #00AFE4; background-image: linear-gradient(to right,#00AFE4,#0FC9FF);" time-limit="2019-01-19 0:0:0"> 买阿里云联系我返现15%现金 </a> 
      </div>
     </div> 
     <div class="fly-panel fly-rank fly-rank-reply" id="LAY_replyRank"> 
      <h3 class="fly-panel-title">回贴周榜</h3> 
      <dl> 
            {volist name="week_reply" id="reply"}
            <dd>
               <a href="{:url('index/user/home',['uid'=>$reply.user_id])}"><img src="__ROOT__/{$reply.face}" /><cite>{$reply.nickname}</cite><i>{$reply.cn}次回答</i></a>
            </dd>
            {/volist}
      </dl> 
     </div> 
     {include file="public/week_hot" /} 
     <div class="fly-panel"> 
      <div class="fly-panel-title">
        官方产品 
      </div> 
      <div class="fly-panel-main"> 
       <a href="http://www.layui.com/admin/?from=fly" target="_blank" class="fly-zanzhu" time-limit="2017.09.25-2099.01.01" style="background-color: #20222A; background-image: linear-gradient(to right,#20222A,#3E4251);">layuiAdmin - layui 官方后台管理模板</a> 
       <a href="http://layim.layui.com/?from=fly" target="_blank" class="fly-zanzhu" time-limit="2017.09.25-2099.01.01" style="background-color: #009688; background-image: linear-gradient(to right,#009688,#5FB878);">LayIM - layui 即时通讯旗舰之作</a> 
      </div>
     </div> 
     <div class="fly-panel" style="padding: 20px 0; text-align: center;"> 
      <img src="//cdn.layui.com/upload/2017_8/168_1501894831075_19619.jpg" style="max-width: 100%;" alt="layui" /> 
      <p style="position: relative; color: #666;">微信扫码关注 layui 公众号</p> 
     </div> 
     <div class="fly-panel fly-link"> 
      <h3 class="fly-panel-title">友情链接</h3> 
      <dl class="fly-panel-main"> 
       <dd>
        <a href="http://layim.layui.com/" target="_blank">WebIM</a>
       </dd>
       <dd> 
       </dd>
       <dd>
        <a href="http://layer.layui.com/" target="_blank">layer</a>
       </dd>
       <dd> 
       </dd>
       <dd>
        <a href="http://www.layui.com/laydate/" target="_blank">layDate</a>
       </dd>
       <dd> 
       </dd>
       <dd>
        <a href="http://www.bejson.com/" target="_blank">JSON在线工具</a>
       </dd>
       <dd> 
       </dd>
       <dd>
        <a href="http://www.smeoa.com/" target="_blank">小微OA</a>
       </dd>
       <dd> 
       </dd>
       <dd>
        <a href="http://www.fineui.com/" target="_blank">FineUI开源控件</a>
       </dd>
       <dd> 
       </dd>
       <dd>
        <a href="https://www.hellojava.com/" target="_blank">Java菜鸟社区</a>
       </dd>
       <dd> 
       </dd>
       <dd>
        <a href="https://juejin.im?from=layui" target="_blank">掘金开发者社区</a>
       </dd>
       <dd> 
       </dd>
       <dd>
        <a href="http://www.jianliben.com/" target="_blank">简历模板</a>
       </dd>
       <dd> 
       </dd>
       <dd>
        <a href="http://www.uileader.com/" target="_blank">TouchUI移动框架</a>
       </dd>
       <dd> 
       </dd>
       <dd>
        <a href="http://wanghongwan.com/" target="_blank">网红湾</a>
       </dd>
       <dd> 
       </dd>
       <dd>
        <a href="javascript:;" onclick="layer.alert('发送邮件至：xianxin@layui-inc.com&lt;br&gt; 邮件标题为：申请Fly社区友链', {title:'申请友链'});" class="fly-link">申请友链</a>
       </dd>
       <dd> 
       </dd>
      </dl> 
     </div> 
    </div> 
   </div>
  </div>

  <script>

      layui.use('layer', function(){
         layer = layui.layer;
      });
    
      $(function () {
          
          $('#signin').click(function(event) {
              
              $.get('{:url('index/user/sign')}', function(data) {
                if(data.code==1){
                  location.reload();
                }else{
                  layer.msg(data.msg);
                }
              });
          });
      })
  </script>
